package com.xiaomaoguai.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author August.zhang
 * @version v1.0.0
 * @date 2020/1/6 16:53
 * @since JDK 1.8
 */
@EnableDiscoveryClient
@EnableCircuitBreaker
@SpringBootApplication
public class ConsumerHystrixApplication {

	@Bean
	@LoadBalanced
	public RestTemplate restTemplate() {
		return new RestTemplate();
	}

	public static void main(String[] args) {
		SpringApplication.run(ConsumerHystrixApplication.class, args);
	}

}
